import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 初始化样式
import '@/assets/css/reset.css'
// rem 适配js
// import 'amfe-flexible'

// 设置html根字体大小
import '@/assets/css/font_html.css'

// 导入vant css(由于采用配置主题方式，这里需要导入vant less 主题文件,如果不需要自定义主题注释下面代码，然后解除config/cdn.js 中vant主题样式的注释)
import 'vant/lib/index.less'

// 路由权限拦截
import './router/permission'

// 初始化svg图标
import './icons/index'
window.addEventListener('popstate', function() {
  router.isBack = true
}, false)
import dd from 'gdt-jsapi'
Vue.prototype.$dd = dd
// import { Toast } from 'vant'
// Vue.prototype.$Toast = Toast
// 注册自定义全局组件
import components from './utils/components'
import HeaderBar from '@/components/HeaderBar'
import Toast from '@/components/Toast'
// 注册全局插件
import plugins from './utils/plugins'
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
// 注册全局主键
Vue.component('header-bar', HeaderBar)
Vue.component('toast', Toast)
Vue.prototype.$Toast = Toast
Vue.use(plugins).use(components)
import until from '@/utils/phonesdk'
Vue.prototype.$until = until
import minixs from './utils/main'
Vue.use(minixs)
new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
